const TOKENKEY = 'hema-token'
// 保存token
const saveToken = tokenobj => {
  window.localStorage.setItem(TOKENKEY, JSON.stringify(tokenobj))
}
// 获取token
const getToken = () => {
  return JSON.parse(window.localStorage.getItem(TOKENKEY))
}
// 删除token
const removeToken = () => {
  window.localStorage.removeItem(TOKENKEY)
}
export { saveToken, getToken, removeToken }
